package com.gitee.melin.bee.core.jdbc;

import java.sql.Connection;
import java.sql.SQLException;
import javax.annotation.PreDestroy;
import javax.sql.DataSource;

public interface ConnectionFactory extends AutoCloseable {
    Connection openConnection() throws SQLException;

    DataSource getDataSource();

    @Override
    @PreDestroy
    default void close() throws SQLException {}
}
